package day04;
import java.util.Scanner;
public class Day04HomeWork02 {
    public static void main(String[] args) {
       Scanner scan_a=new Scanner(System.in);
       System.out.println("请输入您要要求的服务：1.洗头 2.剪头 3.吹头");
        int number=scan_a.nextInt();
        switch (number){
            case 1:
                System.out.println("已经派出美女为您洗头");
                break;
            case 2:
                System.out.println("已经派出哑巴为您理发");
                break;
            case 3:
                System.out.println("马上为您吹头");
                break;
            default:
                System.out.println("我听不明白您在说些什么");
        }

        Scanner scan_b=new Scanner(System.in);
        System.out.println("请输入你猜的年龄");
        int age=scan_b.nextInt();
        int answer_a=(int)(Math.random()*100+1);
        while (age!=answer_a){
            if (age<answer_a){
                System.out.println("猜小了");
            }else if(age>answer_a){
                System.out.println("猜大了");
            }
            System.out.println("请重新输入");
            age=scan_b.nextInt();
        }
        System.out.println("恭喜你,猜对了");


        Scanner scan_c=new Scanner(System.in);

        int money;
        int answer=(int)(Math.random()*10+1);
        do{
            System.out.println("请输入你猜的值");
            money=scan_c.nextInt();
            if(money<answer){
                System.out.println("猜小了");
            }else if(money>answer){
                System.out.println("猜大了");
            }else{
                System.out.println("恭喜你，猜对了！");
            }
        }while (money!=answer);


        for(int num=0;num<5;num++){
            System.out.println("行动是成功的阶梯");
        }

        for(int num=1;num<10;num++){
            System.out.println(num+"*9="+num*9);
        }
        for(int num=1;num<10;num+=2){
            System.out.println(num+"*9="+num*9);
        }
        for(int num=9;num>0;num--){
            System.out.println(num+"*9="+num*9);



        }
    }
}
